<template>
  <div>
      <el-table
        :data="booksBuyList"
        height="250"
        border
        style="width: 100%">
        <el-table-column
        prop="descSellBuy"
        label="卖书/买书"
        width="100">
        </el-table-column>
        <el-table-column
        prop="bookName"
        label="书籍名"
        width="180">
        </el-table-column>
        <el-table-column
        prop="bookVersion"
        label="书籍版本"
        width="100">
        </el-table-column>
        <el-table-column
        prop="bookAuthor"
        label="编者">
        </el-table-column>
        <el-table-column
        prop="bookPublish"
        label="出版社">
        </el-table-column>
        <el-table-column
        prop="bookDiscount"
        label="是否打折">
        </el-table-column>      
        <el-table-column 
        style="color: red"
        prop="bookPrice"
        label="价格">
        </el-table-column>
        <el-table-column
        prop="contact"
        label="联系方式">
        </el-table-column>
        <el-table-column
        prop="dateTime"
        label="发布时间">
        </el-table-column>     
    </el-table>
  </div>
</template>

<script>
export default {
    name: 'BooksBuy',
    data() {
        return {
            booksBuyList: []
        }
    },
    mounted() {
        this.initBooksSell()
    },
    methods:{
        initBooksSell() {
            this.getRequest('/books/getBooksBySell').then((resp) => {
                if(resp) {
                    this.booksBuyList = resp;
                    console.log(resp)
                }
            }) 
        }
    }
}
</script>

<style>

</style>